{% extends 'base.html' %}

{% block title %} {{ scrum.name.value }} {% endblock %}

{% block content %}

<script type="text/javascript" src="/static/timepicker/jquery.timepicker.js"></script>
<link rel="stylesheet" type="text/css" href="/static/timepicker/jquery.timepicker.css" />
<script>
  $(function() {
      $('.timepicker').timepicker();
  });
</script>
<h3> 
	{% if editable %}
		Edit 
	{% elif deletable %}
		Delete
	{% else %}
		View 
	{% endif %}
	Scrum: {{ scrum.name.value }}
</h3>

{% if editable %}
	<form method='post'> {% csrf_token %}
{% elif deletable %}
	<form method='post'> {% csrf_token %}
{% endif %}

<fieldset name="scrum">

{{ scrum.as_p }}

</fieldset>


{% if editable %}
	<input type='submit' value='Save'>	
	</form>
	<form action='/scrums/' method="get">
    <input type="submit" value="Back" />
    </form>
{% elif deletable %}
	<input type='submit' value='Delete'>
	<form action='/scrums/' method="get">
    <input type="submit" value="Back" />
    </form>

{% else %}
    <ul>
			<li><a href="/scrum/edit/{{ id }}/">Edit</a></li>
			<li><a href='/scrums/'>Back</a></li>
			
	</ul>
	
{% endif %}

{% endblock %}
